<?php
/**
 * Created by PhpStorm.
 * User: jieai
 * Date: 2017-07-14
 * Time: 23:00
 */
namespace app\index\model;
use think\Model;
class Gsrecord extends Model{
	public function Members()
	{
		return $this->belongsToMany('Member','member_gsrecord','member_id','gsrecord_id');
	}
	public function Station(){
		return $this->belongsTo('Station')->bind('name');
	}

    public function Gsvalue()
    {
        return $this->hasMany('Gsvalue');
	}

	protected $type=[
		'starttime'=>'timestamp:Y-m-d  H:i',
		'donetime'=>'timestamp:Y-m-d  H:i'
	];
	protected  $autoWriteTimestamp=true;
	protected $updateTime=false;
	protected $createTime='createtime';

	/**获取器
	 * @param $value
	 * @return mixed
	 */
	/*
	public function getPendAttr($value)
	{
		$pends=[0=>'未审核',1=>'已审核'];
		return $pends[$value];
	}
	*/
}